ASYNC =
ASYN =

TARGET := kernel_sym_hash_perf
obj-m = $(TARGET).o
#$(TARGET)-objs = sym_hash_interface.o sym_hash_interface_async.o sym_hash.o
$(TARGET)-objs = sym_hash.o sym_hash_interface.o sym_hash_interface_async.o

# If run command 'make ASYNC=enable', the macro 'ASYN_RESOURCE_RECOVERY' will enable.
# The macro 'ASYN_RESOURCE_RECOVERY' is used to enable the asynchronization mode which
# released resources at dequeue part.
# In default, ASYNC is disabled. Therefore, the defult mode is synchronization mode
# which released resources at enqueue part.
ifeq ($(ASYNC), enable)
EXTRA_CFLAGS += -DASYN_RESOURCE_RECOVERY
else ifeq ($(ASYN), enable)
EXTRA_CFLAGS += -DASYN_RESOURCE_RECOVERY
endif

KBUILD_EXTRA_SYMBOLS=/home/ccore2/work/CCP903_SEC_DRIVER/CCP903_SEC_BRANCH/Module.symvers
all:
	cp ../CCP907_SEC_MODULE/CCP903_SEC_BASE/Module.symvers ./
	make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules
clean: 
	rm -rf *.o *.ko *.mod.c *.mod.o modules.* Mod* .tmp* .cache* .*.cmd

